﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Brjostagjof_H4.Models.ProfileViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Brjóstagjöf.is | Um mig
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3>Um mig</h3>
        <table id="main-table">
        <tr>
            <td id="main-table-left">
                <% using (Html.BeginForm()) { %>
                    <%: Html.ValidationSummary(true, "Ekki tókst að breyta upplýsingum. Athugaðu hvort slegið hafi verið rétt inn í báða reiti.") %>       
                    <div class="display-label">
                    <%: Html.LabelFor(model => model.userName) %>
                    </div>
                    <div class="display-field"><%: Model.userName %></div>
                    <div class="editor-label">
                    <%: Html.LabelFor(model => model.fullName) %>
                    </div>
                    <div class="editor-field">
				        <%:Html.TextBoxFor(model => model.fullName) %> 
			        </div>
                    <div class="editor-label">
                    <%: Html.LabelFor(model => model.title) %>
                    </div>
                    <div class="editor-field">
				        <%:Html.TextBoxFor(model => model.title) %> 
			        </div>
                    <div class="editor-label">
                    <%: Html.LabelFor(model => model.email) %>
                    </div>
                    <div class="editor-field">
				        <%: Html.TextAreaFor(model => model.email)%>
				        <%: Html.ValidationMessageFor(model => model.email) %>
			        </div>
                    <div class="editor-label">
                    <%: Html.LabelFor(model => model.phoneNumber) %>
                    </div>
                    <div class="editor-field">
				        <%: Html.TextAreaFor(model => model.phoneNumber)%>
			        </div>
                
                    <input type="submit" value="Breyta upplýsingum" />
                    <% } %>
                <div>
                <br />
                <%: Html.ActionLink("Breyta lykilorði", "../Account/ChangePassword")%></div>
            </td>

            <td id="main-table-right">
                <div class="options">
                    <% if (User.IsInRole("Administrators")){Html.RenderPartial("ProfileAdminMenu", "Model");} %>
                    <% else if (User.IsInRole("Professionals")){Html.RenderPartial("ProfileProMenu", "Model");} %>
                    <% else {Html.RenderPartial("ProfileMenu", "Model");} %>
                </div>
            </td>

        </tr>
    </table>
        




</asp:Content>

